<div>
  <table border="1" cellspacing="0">
    <tr>
      <th width="20" rowspan="2">总分排名</th><th rowspan="2">总分</th><th rowspan="2">ID</th>
      <th rowspan="2" width="98">投稿时间</th><th rowspan="2">标题</th><th rowspan="2" width="86">类别</th>
      <th rowspan="2" width="90">投稿人</th><th colspan="4">播放</th>
      <th colspan="3">评论</th><th colspan="3">收藏</th>
    </tr>
    <tr>
      <th>数</th><th width="20">R</th><th width="20">P</th><th width="20">比</th>
      <th>数</th><th width="20">R</th><th width="20">比</th>
      <th>数</th><th width="20">R</th><th width="20">比</th>
    </tr>
    <% @stats.each do |r| %>
<% if r.space_fix < 1 %>
    <tr style="color:gray">
<% else %>
    <tr>
<% end %>
      <td><%=r['point_rank']%></td>
      <td><b><%=r['point']%></b></td>
      <td><%=r.work.wid%></td>
      <td><%=r.work.cdate.strftime "%Y-%m-%d %H:%M"%></td>
      <td><%=r.work.name%></td>
      <td><%=r.work.ac_type.name%></td>
      <td><%=r.work.author_name%></td>
      <td><%=r.clicks%></td>
      <td><%=r['click_rank']%></td>
      <td><%=r.work.part_count%></td>
      <td><%=100 * r.click_point.to_i / r['point'].to_i%></td>
      <td><%=r.comments%></td>
      <td><%=r['comment_rank']%></td>
      <td><%=100 * r.comment_point.to_i / r['point'].to_i%></td>
      <td><%=r.stows%></td>
      <td><%=r['stow_rank']%></td>
      <td><%=100 * r.stow_point.to_i / r['point'].to_i%></td>
    </tr>
    <% end %>
  </table>
</div>